package com.ruoyi.common.exception.base.service;

import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.StringUtils;

/**
 * @Classname BaseServiceException
 * @Author: sunluquan
 * @Date: 2022/7/6 17:27
 * @Description TODO
 */
public class BaseServiceException extends BaseException {

    public BaseServiceException(String module, String code, Object[] args, String defaultMessage) {
        super(StringUtils.isEmpty(module)?"service":module, code, args, defaultMessage);
    }

    public BaseServiceException(String module, String code, Object[] args) {
        this(module, code, args ,null);
    }

    public BaseServiceException(String module, String defaultMessage) {
        this(module , null ,null , defaultMessage);
    }

    public BaseServiceException(String code, Object[] args) {
        this(null,code, args,null);
    }

    public BaseServiceException(String defaultMessage) {
        this(null,null,null,defaultMessage);
    }
}
